Editing an HTML tag in the Document window

Use the Quick Tag Editor to quickly inspect and edit the HTML source of a single tag from within the Document window, without having to switch to the HTML Source inspector and back again. The easiest way to open the Quick Tag editor is to press Control+T (Windows) or Command+T (Macintosh).

The Quick Tag Editor has these three modes:

Insert HTML, used to insert new HTML code
Edit Tag, used to edit an existing tag
Wrap Tag, used to wrap a new tag around the current selection

The current selection in the Document window determines which mode the Quick Tag Editor opens in.

Note: When the Quick Tag Editor is open, you can switch from one mode to another using the same keyboard shortcut you used to open the Quick Tag Editor.

In all three modes, the basic operation of the Quick Tag Editor is the same: you open the editor, enter or edit tags and attributes, and then close the editor. The difference among the modes lies in what Dreamweaver does with the tags when you've edited them. For details about the modes, see About Insert HTML mode, About Edit Tag mode, and About Wrap Tag mode.

Note: Whenever the Quick Tag Editor is showing, in any mode, you can drag the editor's handle (where the mode name appears) to move the editor around.

To perform more extensive HTML editing, use the HTML Source inspector.

To enter or edit tags and attributes in the Quick Tag Editor:

1 Do one of the following:
Select an object, some text, or a tag.
Click in the Document window to place the insertion point without selecting anything.
2 Press Control+T (Windows) or Command+T (Macintosh), or click the Quick Tag Editor button in the Property inspector.
The Quick Tag Editor opens in whichever mode is appropriate, depending on the current selection.
In Insert HTML mode or Wrap Tag mode, you may now enter an HTML tag; in Edit Tag mode, you may enter new attributes, edit existing attributes, or edit the tag's name.
3 To edit existing attribute values or names (or to edit the tag name), press Tab to move forward from one item to the next, until the attribute (or tag) that you want to edit is selected. Press Shift+Tab to move backward to the previous attribute name, attribute value, or tag name.
4 If you pause for a couple of seconds while editing an attribute name, a drop-down hints menu appears, listing all the valid attributes for the tag you're editing. (If Dreamweaver doesn't recognize the tag you're editing, the hints menu contains all the attributes that Dreamweaver recognizes for any tag.) The hints menu does not appear if you deselected the Enable Tag Hints option in the Quick Tag Editor panel of the Preferences dialog box. Control the hints menu in the following ways:
As you begin to type an attribute name, the hints menu scrolls to highlight the first attribute name that starts with the letters you've typed.
To move the highlight up and down in the menu, use the Up and Down Arrow keys or the scroll bar.
To choose the highlighted attribute name, press Enter (Windows) or Return (Macintosh); the highlighted attribute name is entered into the Quick Tag Editor. Alternatively, double-click an attribute name in the menu to enter it.
To dismiss the hints menu without selecting an entry, press Esc or simply continue typing.
When you pause while entering or editing a tag name, a similar drop-down hints menu appears, listing tag names instead of attribute names.
5 In Edit Tag mode, if you make a change and then press Tab or Shift+Tab, the change you made is applied immediately. To prevent changes from being made until you exit the Quick Tag Editor, deselect the Apply Changes Immediately While Editing option in the Quick Tag Editor panel of the Preferences dialog box.
Note: When Apply Changes Immediately While Editing is deselected, multiple changes that you apply at once appear as a single step in the History palette and are undone with a single Undo.
6 To add a new attribute to a tag, use Tab, the arrow keys, and Spacebar to move the insertion point to where you want to add an attribute. Begin to type a valid attribute name for the tag. The drop-down hints menu appears when you pause in typing, just as it does for edited attributes.
7 Continue to edit and add attribute names and values as desired.
8 When you're done editing the tag, exit the Quick Tag Editor in either of these ways:
To exit and discard all changes that have not yet been applied, press Esc. (If you were using Edit Tag mode with the Apply Changes Immediately While Editing option selected, all changes that have already been applied remain in place.)
To exit and apply all your changes, press Enter (Windows) or Return (Macintosh) or click outside the Quick Tag Editor.
9 If you use any invalid HTML in the Quick Tag Editor, Dreamweaver attempts to correct it for you by inserting closing quotation marks and closing angle brackets where needed.

To select the current tag's parent (containing) tag:

Do one of the following:

Press Control+Shift+< (Windows) or Command+Shift+< (Macintosh).
Choose Edit > Select Parent Tag.

To select the first child tag contained in the current tag:

Do one of the following:

Press Control+Shift+> (Windows) or Command+Shift+> (Macintosh).
Choose Edit > Select Child.

Note: If the current tag contains no other tags, Select Child selects the contents of the current tag.

To cycle through the Quick Tag Editor's modes:

With the Quick Tag Editor active, press Control+T (Windows) or Command+T (Macintosh).

The Quick Tag Editor changes modes each time you use the keyboard shortcut, cycling among Insert HTML mode, Edit Tag mode, and Wrap Tag mode.